package com.yanqu.data.entity.setting;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.List;

@FieldTypeAnnotation(tableName = "t_s_monitor_goods_ratio_value", desc = "用户群阈值；倍率")
public class CustomThresholdRatioData extends DataObject {

    @FieldTypeAnnotation(select = true, update = true, desc = "数据库自增主键")
    private long dbId;

    @FieldTypeAnnotation(update = true, desc = "渠道；0是所有")
    private int channelId;

    /**
     * vip等级
     */
    @FieldTypeAnnotation(desc = "vip等级")
    private int vip;

    @FieldTypeAnnotation(desc = "阈值类型：0次数，1数量")
    private int thresholdType;

    @FieldTypeAnnotation(desc = "阈值范围")
    private List<Integer> thresholdRange;

    @FieldTypeAnnotation(desc = "倍率")
    private int thresholdRatio;

    @FieldTypeAnnotation(desc = "是否删除")
    private int del;


    public long getDbId() {
        return dbId;
    }

    public void setDbId(long dbId) {
        this.dbId = dbId;
    }

    public int getChannelId() {
        return channelId;
    }

    public void setChannelId(int channelId) {
        if(this.channelId != channelId) {
            this.channelId = channelId;
            setUpdateOption();
        }
    }

    public int getVip() {
        return vip;
    }

    public void setVip(int vip) {
        if(this.vip != vip) {
            this.vip = vip;
            setUpdateOption();
        }
    }

    public int getThresholdType() {
        return thresholdType;
    }

    public void setThresholdType(int thresholdType) {
        if(this.thresholdType != thresholdType) {
            this.thresholdType = thresholdType;
            setUpdateOption();
        }
    }

    public List<Integer> getThresholdRange() {
        return thresholdRange;
    }

    public void setThresholdRange(List<Integer> thresholdRange) {
        this.thresholdRange = thresholdRange;
        setUpdateOption();
    }

    public int getThresholdRatio() {
        return thresholdRatio;
    }

    public void setThresholdRatio(int thresholdRatio) {
        if(this.thresholdRatio != thresholdRatio) {
            this.thresholdRatio = thresholdRatio;
            setUpdateOption();
        }
    }

    public int getDel() {
        return del;
    }

    public void setDel(int del) {
        if(this.del != del) {
            this.del = del;
            setUpdateOption();
        }
    }
}
